package com.ybkj.o2o.zhuanche.manager;

import com.ybkj.o2o.zhuanche.common.DataGrid;
import com.ybkj.o2o.zhuanche.common.query.Car2Query;
import com.ybkj.o2o.zhuanche.common.query.CarQuery;
import com.ybkj.o2o.zhuanche.entity.Car;
import com.ybkj.o2o.zhuanche.entity.CarType;

import java.util.List;
import java.util.Map;

public interface CarManager {

    Car findByCarId(Long carId, String appKey);

    Car save(Car car);

    void deleteById(Long id, String appKey);

    void update(Car car, Long oldEmployId);

    Car findByNumber(String carNumber, String appKey);

    List<Car> findInsuranceTimeOverdue(Long companyId, String appKey);

    List<Car> findOverhaulTimeOverdue(Long companyId, String appKey);

    List<Car> findByCarType(CarQuery carQuery);

    Car queryByEmployId(Long employId, String appKey);

    Car queryCarByNumber(String carNumber, String appKey);

    DataGrid<Car> findByParams(CarQuery carQuery);

    DataGrid<Car> findByTiaojians(Car2Query car2Query);

    Long findByRentalCompanyId(Long rentalCompanyId, String appKey);

    Map<String, Object> batchCreate(String cars, String appKey);

    DataGrid<Car> findByIds(CarQuery carQuery);

    List<Car> updateByIds(Long[] ids, String appKey);

    long count(String appKey);

    Car queryCarByNumberAndFlights(String carNumber, String flights,
                                   String appKey);

    CarType getCarTypeByTypeName(String typeName, String appKey);

    /**
     * 修改车辆上传状态
     *
     * @param id
     */
    void updateUpStatus(Long id);

}
